<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>五指山污水处理系统</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/huazhi/lib/layui-v2.5.5/css/layui.css" media="all">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/huazhi/css/public.css" media="all">
    <link rel="shortcut icon" href="<%=request.getContextPath()%>/huazhi/images/favicon.ico"/>
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/logincss/layout.css" media="all">
</head>
<style>
    /* 底部固定区域 */
    .layui-layout-admin .layui-footer {
        padding: 10px 0;
        text-align: center;
    }

    .layui-layout-admin .layui-footer {
        background-color: #fff;
    }

    .el-input__suffix {
        position: absolute;
        height: 100%;
        right: 5px;
        top: 0;
        text-align: center;
        color: #c0c4cc;
        transition: all .3s;
        pointer-events: none;
    }

</style>
<body>
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body">
            <form class="layui-form" lay-filter="component-form-element" id="form" method="post" >
                <input type="hidden" name="id" id="id">
                <div class="layui-tab layui-tab-brief">
                    <div class="layui-tab-content" style="height: auto">
                        <div class="layui-tab-item layui-show">
                            <div class="layui-form-item">
                                <div class="layui-col-lg6">
                                    <div class="layui-col-xs11">
                                        <label class="layui-form-label">村庄名称</label>
                                        <div class="layui-input-block">
                                            <select disabled type="text" id="czmc" name="czmc" lay-verify="czmc"
                                                    class="layui-input" style="padding-right: 30px;">
                                                <option value="">请选择</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="layui-col-xs1">
                                        <div class="layui-form-mid layui-word-aux"
                                             style="color: red !important;padding: 10px !important;">*
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-col-lg6">
                                    <div class="layui-col-xs11">
                                        <label disabled class="layui-form-label">设施编码</label>
                                        <div class="layui-input-block">
                                            <input type="text" name="ssbm" lay-verify="ssbm"
                                                   autocomplete="off" placeholder="请输入设施编码"
                                                   class="layui-input" style="padding-right: 30px;">
                                        </div>
                                    </div>
                                    <div  class="layui-col-xs1">
                                        <div class="layui-form-mid layui-word-aux"
                                             style="color: red !important;padding: 10px !important;">*
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-col-lg6">
                                    <div class="layui-col-xs11">
                                        <label class="layui-form-label">维修日期</label>
                                        <div  class="layui-input-block">
                                            <input disabled type="text" name="wxrqSting" id="wxrqSting"
                                                   autocomplete="off" placeholder="请输入维修日期"
                                                   class="layui-input">
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-col-lg6">
                                    <div class="layui-col-xs11">
                                        <label class="layui-form-label">维修的设施</label>
                                        <div class="layui-input-block">
                                            <select disabled class="layui-input" name="wxss">
                                                <option value="">请选择</option>
                                                <option value="户内设施">户内设施</option>
                                                <option value="污水管网">污水管网</option>
                                                <option value="污水处理设施">污水处理设施</option>
                                                <option value="其他设施">其他设施</option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-col-lg6">
                                    <div class="layui-col-xs11">
                                        <label class="layui-form-label">维修项目及内容</label>
                                        <div class="layui-input-block">
                                            <input disabled type="text" name="wxxmjnr"
                                                   autocomplete="off" placeholder="请输入维修项目及内容"
                                                   class="layui-input" style="padding-right: 30px;">
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-col-lg6">
                                    <div class="layui-col-xs11">
                                        <label class="layui-form-label">维修途径</label>
                                        <div class="layui-input-block">
                                            <select disabled type="text" name="wxtj" lay-verify="wxtj" class="layui-input">
                                                <option value="">请选择</option>
                                                <option value="维修">维修</option>
                                                <option value="更换">更换</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="layui-col-xs1">
                                        <div class="layui-form-mid layui-word-aux"
                                             style="color: red !important;padding: 10px !important;">*
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-col-lg6">
                                    <div class="layui-col-xs11">
                                        <label class="layui-form-label">维修后状况</label>
                                        <div class="layui-input-block">
                                            <select disabled type="text" name="wxhzk" lay-verify="wxhzk" class="layui-input">
                                                <option value="">请选择</option>
                                                <option value="正常运行">正常运行</option>
                                                <option value="不正常运行">不正常运行</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="layui-col-xs1">
                                        <div class="layui-form-mid layui-word-aux"
                                             style="color: red !important;padding: 10px !important;">*
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-col-lg6">
                                    <div class="layui-col-xs11">
                                        <label class="layui-form-label">维修落实人员</label>
                                        <div class="layui-input-block">
                                            <input disabled type="text" name="wxlsry" lay-verify="wxlsry"
                                                   autocomplete="off" placeholder="请输入维修落实人员"
                                                   class="layui-input" style="padding-right: 30px;">
                                        </div>
                                    </div>
                                    <div class="layui-col-xs1">
                                        <div class="layui-form-mid layui-word-aux"
                                             style="color: red !important;padding: 10px !important;">*
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-col-lg6">
                                    <div class="layui-col-xs11">
                                        <label class="layui-form-label">备注</label>
                                        <div class="layui-input-block">
                                            <input disabled type="text" autocomplete="off" class="layui-input"
                                                   lay-verify="bz" placeholder="请输入备注" name="bz">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>

            </form>
        </div>
    </div>
</div>
<script src="<%=request.getContextPath()%>/huazhi/lib/layui-v2.5.5/layui.all.js"></script>
<script>
    function child(id) {
        layui.use(['form', 'laydate', 'layer', 'laypage'], function () {
            var $ = layui.$
                , form = layui.form
                , laydate = layui.laydate
                , layer = layui.layer;

            laydate.render({
                elem: '#wxrqSting' //指定元素
            });

            //自定义验证规则
            form.verify({
                // name: function (value, item) {
                //     if (value == "") {
                //         return '请输入村名';
                //     }
                // },
                // cunweihui: function (value, item) {
                //     if (value == "") {
                //         return '请输入村委会名称';
                //     }
                // },
                // contact: function (value, item) {
                //     if (value == "") {
                //         return '请输入联系人';
                //     }
                // },
                // phone: function (value, item) {
                //     if (value == "") {
                //         return '请输入联系电话';
                //     }
                // },
                // jingdu: function (value, item) {
                //     if (value == "") {
                //         return '请输入村庄所在经度';
                //     }
                // },
                // weidu: function (value, item) {
                //     if (value == "") {
                //         return '请输入村庄所在纬度';
                //     }
                // }
            });

            $.ajax({
                type: "get",
                url: "<%=request.getContextPath()%>/rest/base/seleAllZrc",
                dataType: "json",
                async: false,
                data:{},
                success:function (msg){
                    var select = document.getElementById("czmc");
                    $.each(msg.zrcList,function(i,n) {
                        select.options.add(new Option(n.title,n.title));

                    });
                    form.render('select','czmc');
                }
            })
            $.ajax({
                type: "get",
                url: "<%=request.getContextPath()%>/rest/base/getWxssById",
                dataType: "json",
                async: false,
                data: "id=" + id,
                success: function (data) {
                    form.val("component-form-element", data);
                }
            })

        });

    }
</script>
</body>
</html>